-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Update to ROM 3.x #15
Open
elskwid
wants to merge
18
commits into
master
Choose a base branch
from
update-to-rom-3.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was removed from `ROM::Command` as part of the move to 3.x. Data should be validated before being sent to commands. See: rom commit 80bb84
The `assert_tuple_count` checking was removed from `ROM::Command` during the 2.x work. The underlying command no longer performs this check so the spec was failing. See: rom commit bec2c4
`ROM::Memory::Dataset` was updated to use `dry-initializer` so the calls to `option` in dataset here are now updated using the new syntax with some bonus type checking courtesy of `dry-types`. See: rom commit 25f937
Support the same ruby versions as other `rom-*` gems.
elskwid
force-pushed
the
update-to-rom-3.x
branch
from
February 25, 2017 23:05
58f1107
to
ed58c21
Compare
Provides a `Test` module to the specs to isolate test-specific classes and objects. This is similar to setup in other rom-* gems.
There were still a few references to repository which are now removed.
Updates the gateway to use the ROM initializer class, which is a thin wrapper around `dry-initializer` - eliminating some boilerplate and allow for some type enforcement for params. Of note, the `options` param was renamed to `csv_options` since `dry-initializer` *did not like* a param named `options`. Also, the `datasets` attr reader was moved up to make it a little more obvious.
Updates the `relation_spec` to use the new `Test` module to isolate the `RelationPlugin` module created for the examples.
Use the new `ROM::CSV::Types` module in the params/options definitions throughout.
The `execute` method is the only public method exposed by commands at this time.
Recent changes to `ROM::Memory::Relation` made it possible to use it as the superclass for adapter relations. This adds schema support among other things.
Adds `CSV::Storage` to perform the reading and writing to csv files. The new class is used in the `Dataset` and the `Gateway`. The connection is passed in to the dataset to keep the command functionality working.
elskwid
force-pushed
the
update-to-rom-3.x
branch
from
March 6, 2017 04:14
d86215d
to
983fc7b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work in progress to get
rom-csv
up-to-snuff with ROM 3.x.This includes several of the changes from #14 (ROM 2.x) as well.
TODO:
dry-struct
instead ofvirtus
dry-initializer
where possibleTypes
module and use types in initializersROM::Memory::Relation
rom-repository
💃integration/gateway_spec
->integration/adapter_spec
and add more specsdatabase_setup
to something more revealingrom-yaml
rom-sql
- there's some good specs in there that could be helpful here (perhaps another linter?).